/**
 * 
 */
package jge.window.tests.awt;

import jge.window.JGEWindow;
import jge.window.JGEWindowFactory;
import jge.window.JGEWindowFactory.WINDOWAPI;
import junit.framework.Assert;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @author Sam Pengilly
 *
 */
public class AWTTests {

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
		
	}

	@Test
	public void testCreateWindow() {
		JGEWindow window = JGEWindowFactory.createWindow(WINDOWAPI.AWT, "Test Window", 640, 480, false);
		Assert.assertNotNull(window);
	}
	
	@Test
	public void testGetSize() {
		JGEWindow window = JGEWindowFactory.createWindow(WINDOWAPI.AWT, "Test Window", 640, 480, false);
		Assert.assertEquals(640, window.getWidth());
		Assert.assertEquals(480, window.getHeight());
	}
	
	@Test
	public void testSetSize() {
		JGEWindow window = JGEWindowFactory.createWindow(WINDOWAPI.AWT, "Test Window", 640, 480, false);
		window.setSize(800, 600);
		Assert.assertEquals(800, window.getWidth());
		Assert.assertEquals(600, window.getHeight());
	}
	
	@Test
	public void testFullScreen() {
		JGEWindow window = JGEWindowFactory.createWindow(WINDOWAPI.AWT, "Test Window", 800, 600, true);
		Assert.assertEquals(true, window.getFullScreen());
	}
	
	@Test
	public void testSetFullScreen() {
		JGEWindow window = JGEWindowFactory.createWindow(WINDOWAPI.AWT, "Test Window", 800, 600, false);
		window.setFullScreen(true);
		Assert.assertEquals(true, window.getFullScreen());
		window.setFullScreen(false);
		Assert.assertEquals(false, window.getFullScreen());
	}

}
